<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>RTOS - a cooperative multitasking library: RTOS::event Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">RTOS - a cooperative multitasking library
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="class_r_t_o_s.html">RTOS</a>      </li>
      <li class="navelem"><a class="el" href="class_r_t_o_s_1_1event.html">event</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="#friends">Friends</a>  </div>
  <div class="headertitle">
<div class="title">RTOS::event Class Reference</div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="RTOS::event" -->
<p>set of things that can happen, or a thing that has happened  
 <a href="class_r_t_o_s_1_1event.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="p_r_t_o_s_8h_source.html">pRTOS.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for RTOS::event:</div>
<div class="dyncontent">
 <div class="center">
  <img src="class_r_t_o_s_1_1event.png" usemap="#RTOS::event_map" alt=""/>
  <map id="RTOS::event_map" name="RTOS::event_map">
<area href="class_r_t_o_s_1_1waitable.html" title="abstract thing that a task can wait for" alt="RTOS::waitable" shape="rect" coords="261,56,425,80"/>
<area href="class_r_t_o_s_1_1channel__base.html" title="RTOS private implementation class." alt="RTOS::channel_base" shape="rect" coords="0,112,164,136"/>
<area href="class_r_t_o_s_1_1clock.html" title="free-running clock, ticks at a fixed frequency" alt="RTOS::clock" shape="rect" coords="174,112,338,136"/>
<area href="class_r_t_o_s_1_1flag.html" title="basic synchronisation mechanism." alt="RTOS::flag" shape="rect" coords="348,112,512,136"/>
<area href="class_r_t_o_s_1_1timer.html" title="one-short timer" alt="RTOS::timer" shape="rect" coords="522,112,686,136"/>
<area href="class_r_t_o_s_1_1channel.html" title="waitable data queue" alt="RTOS::channel&lt; T, SIZE &gt;" shape="rect" coords="0,168,164,192"/>
</map>
 </div></div>

<p><a href="class_r_t_o_s_1_1event-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af3a6450c08560383db9f34b3d826d126"></a><!-- doxytag: member="RTOS::event::print" ref="af3a6450c08560383db9f34b3d826d126" args="(std::ostream &amp;s) const " -->
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_r_t_o_s_1_1event.html#af3a6450c08560383db9f34b3d826d126">print</a> (std::ostream &amp;s) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">prints an event, for debugging only <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad8d6bd84ac8374c4ab9f9eb8579face0"></a><!-- doxytag: member="RTOS::event::operator==" ref="ad8d6bd84ac8374c4ab9f9eb8579face0" args="(const event &amp;rhs) const " -->
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_r_t_o_s_1_1event.html#ad8d6bd84ac8374c4ab9f9eb8579face0">operator==</a> (const <a class="el" href="class_r_t_o_s_1_1event.html">event</a> &amp;rhs) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">report wether two events are the same <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2ecee9deb0913822b19ae609256fa685"></a><!-- doxytag: member="RTOS::event::operator==" ref="a2ecee9deb0913822b19ae609256fa685" args="(const waitable &amp;rhs) const " -->
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_r_t_o_s_1_1event.html#a2ecee9deb0913822b19ae609256fa685">operator==</a> (const <a class="el" href="class_r_t_o_s_1_1waitable.html">waitable</a> &amp;rhs) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">report whether an event corresponds to a waitable <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7d5e26e1dcd4f4d43cc569188ae4ed12"></a><!-- doxytag: member="RTOS::event::operator!=" ref="a7d5e26e1dcd4f4d43cc569188ae4ed12" args="(const event &amp;rhs) const " -->
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_r_t_o_s_1_1event.html#a7d5e26e1dcd4f4d43cc569188ae4ed12">operator!=</a> (const <a class="el" href="class_r_t_o_s_1_1event.html">event</a> &amp;rhs) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">report wether two events are not the same <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a27d10417a15cbb38daca2e7bd3a6a1eb"></a><!-- doxytag: member="RTOS::event::operator!=" ref="a27d10417a15cbb38daca2e7bd3a6a1eb" args="(const waitable &amp;rhs) const " -->
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_r_t_o_s_1_1event.html#a27d10417a15cbb38daca2e7bd3a6a1eb">operator!=</a> (const <a class="el" href="class_r_t_o_s_1_1waitable.html">waitable</a> &amp;rhs) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">report whether an event does not correspond to a waitable <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_r_t_o_s_1_1event.html">event</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_r_t_o_s_1_1event.html#a55a1c8d9e8511156c8f87e223e29d92b">operator+</a> (const <a class="el" href="class_r_t_o_s_1_1event.html">event</a> &amp;rhs) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">add two waitables, result can be used in a wait() call  <a href="#a55a1c8d9e8511156c8f87e223e29d92b"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a00cf9d5d01e670e2b358c2a4c7578e7d"></a><!-- doxytag: member="RTOS::event::event" ref="a00cf9d5d01e670e2b358c2a4c7578e7d" args="(task *t, unsigned int mask)" -->
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_r_t_o_s_1_1event.html#a00cf9d5d01e670e2b358c2a4c7578e7d">event</a> (<a class="el" href="class_r_t_o_s_1_1task.html">task</a> *<a class="el" href="class_r_t_o_s_1_1event.html#a1402687edb26c1d5d26e54dbda21919d">t</a>, unsigned int <a class="el" href="class_r_t_o_s_1_1event.html#a74f6161d8c82d461ae3ba29f0e222b59">mask</a>)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">constructor, used by concrete events <br/></td></tr>
<tr><td colspan="2"><h2><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1402687edb26c1d5d26e54dbda21919d"></a><!-- doxytag: member="RTOS::event::t" ref="a1402687edb26c1d5d26e54dbda21919d" args="" -->
<a class="el" href="class_r_t_o_s_1_1task.html">task</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_r_t_o_s_1_1event.html#a1402687edb26c1d5d26e54dbda21919d">t</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">the owner task <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_r_t_o_s_1_1event.html#a74f6161d8c82d461ae3ba29f0e222b59">mask</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">the mask of this event, one bit is set  <a href="#a74f6161d8c82d461ae3ba29f0e222b59"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="friends"></a>
Friends</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0ee29d8961a0b67cea2c3fa76da116da"></a><!-- doxytag: member="RTOS::event::waitable_set" ref="a0ee29d8961a0b67cea2c3fa76da116da" args="" -->
class&#160;</td><td class="memItemRight" valign="bottom"><b>waitable_set</b></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>set of things that can happen, or a thing that has happened </p>
<p>An event</p>
<ul>
<li>is the result of adding waitables</li>
<li>is accepted as argument to wait()</li>
<li>is returned by wait()</li>
<li>can be compared to a waitable</li>
</ul>
<p>The <a class="el" href="class_r_t_o_s_1_1task.html#a6fc603d0f1c8a94813586d3dfd123fcc" title="wait for all waitables created for this task">task::wait()</a> calls return an event. Such an event can be compared to a waitable. The result is true if and only if the waitable caused the event.</p>
<p>Events are the only <a class="el" href="class_r_t_o_s.html" title="static class, namespace-like container for RTOS declarations">RTOS</a> objects that can be destroyed (without causing an error). </p>
</div><hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a55a1c8d9e8511156c8f87e223e29d92b"></a><!-- doxytag: member="RTOS::event::operator+" ref="a55a1c8d9e8511156c8f87e223e29d92b" args="(const event &amp;rhs) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_r_t_o_s_1_1event.html">event</a> RTOS::event::operator+ </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_r_t_o_s_1_1event.html">event</a> &amp;&#160;</td>
          <td class="paramname"><em>rhs</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>add two waitables, result can be used in a wait() call </p>
<p>Waitables can be added (operator+) to construct a 'set of waitables' as argument to a <a class="el" href="class_r_t_o_s_1_1task.html#a6fc603d0f1c8a94813586d3dfd123fcc" title="wait for all waitables created for this task">task::wait()</a> call. </p>

</div>
</div>
<hr/><h2>Member Data Documentation</h2>
<a class="anchor" id="a74f6161d8c82d461ae3ba29f0e222b59"></a><!-- doxytag: member="RTOS::event::mask" ref="a74f6161d8c82d461ae3ba29f0e222b59" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int <a class="el" href="class_r_t_o_s_1_1event.html#a74f6161d8c82d461ae3ba29f0e222b59">RTOS::event::mask</a><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>the mask of this event, one bit is set </p>
<p>The bit that is set is unique among the events owned by a task. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="p_r_t_o_s_8h_source.html">pRTOS.h</a></li>
</ul>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Friends</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated on Sat Apr 14 2012 15:59:30 for RTOS - a cooperative multitasking library by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.5.1
</small></address>

</body>
</html>
